home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A.C.E. 3
/
ACE CD 3.iso
/
files
/
utils
/
aplay200.lha
/
APlayer
/
Files
/
Developer.lha
/
Rexxtools
/
Doc
/
Rexxtools.doc
< prev
Wrap
Text File
|
1994-10-26
|
12KB
|
358 lines
TABLE OF CONTENTS
rexxtools.library/rxFreeARexx
rexxtools.library/rxGetARexxMsg
rexxtools.library/rxGetPortName
rexxtools.library/rxGetSignals
rexxtools.library/rxInitARexx
rexxtools.library/rxParseARexx
rexxtools.library/rxReplyARexxMsg
rexxtools.library/rxSendARexxMsg
rexxtools.library/rxSetARexxLastError
rexxtools.library/rxToNumber
rexxtools.library/rxToString
rexxtools.library/rxFreeARexx rexxtools.library/rxFreeARexx
NAME rxFreeARexx()
rxFreeARexx (rexxhd);
void rxFreeARexx (APTR);
-36 A1
DESCRIPTION
This function will close the rexx handler. It's fully error checked so
you can pass a NULL to this routine, which means it will do nothing.
This is useful if you want to use the rexx handler blindly.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
SEE ALSO
rxInitARexx()
rexxtools.library/rxGetARexxMsg rexxtools.library/rxGetARexxMsg
NAME rxGetARexxMsg()
rmsg = rxGetARexxMsg (rexxhd);
APTR rxGetARexxMsg (APTR);
D0 -54 A1
DESCRIPTION
This function will return the next ARexx message. If it returns NULL,
it means that there isn't any message or ARexx is not around. If it
returns REXX_RETURN_ERROR, it means that a message sent to ARexx via
the rxSendARexxMsg() has returned an error.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
RESULT
rmsg - this is a RexxMsg message pointer, NULL or REXX_RETURN_ERROR.
SEE ALSO
rxReplyARexxMsg(), rxSetARexxLastError()
rexxtools.library/rxGetPortName rexxtools.library/rxGetPortName
NAME rxGetPortName()
name = rxGetPortName (rexxhd);
APTR rxGetPortName (APTR);
D0 -42 A1
DESCRIPTION
This function returns a pointer to the name of the ARexx port. The name
is based on the AppBaseName plus an invocation number if you have set
the count flag when you made the port with the rxInitARexx() function.
If you haven't got an ARexx port, it will return NULL.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
RESULT
name - a pointer to your port name or NULL. Note that this is read
only, so do not try to change it.
rexxtools.library/rxGetSignals rexxtools.library/rxGetSignals
NAME rxGetSignals()
signals = rxGetSignals (rexxhd);
ULONG rxGetSignals (APTR);
D0 -48 A1
DESCRIPTION
This function returns the signal bit mask that is needed for your ARexx
port. This should be combined with other signal masks to produce the
argument to the Wait() call. This returns NULL if there is no signal
mask.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
RESULT
signals - the signal bit mask.
rexxtools.library/rxInitARexx rexxtools.library/rxInitARexx
NAME rxInitARexx()
rexxhd = rxInitARexx (name, extension, flags, taglist);
APTR rxInitARexx (APTR, APTR, ULONG, struct TagItem *);
D0 -30 A1 A2 D0 A0
DESCRIPTION
This function will initialize a rexx handler structure. The rexx
handler structure is much like a file handler, since it will be used in
all the other functions. All the other functions will automatically
test the rexx handler before doing anything, so you don't have to test
the result of this function. You can blindly use the result in all the
other functions. If ARexx is not availble on your system, it wont do
anything.
INPUTS
name - this is a pointer to a NULL terminated string with the port
name you want to use.
extension - this is a pointer to a NULL terminated string with the file
extension you want to use with your ARexx macros. If this
is NULL, "REXX" (notice that you shouldn't type the leading
".") will be used.
flags - This is a longword with some flags. Each bit represents a
flag. See below for a description of them all.
taglist - a pointer to a array of tags (currently always NULL).
FLAGS
IARXF_PortCount
Set this to zero if you want a unique port. If it's set, you will get
an invocation number at the end of the portname. This can be used if
you want to use multiply copies of the same program.
TAGS
No tags defined yet.
RESULT
rexxhd - This is a rexx handler you'll have to use in all the other
functions in this library or NULL if an error occurs.
SEE ALSO
rxFreeARexx()
rexxtools.library/rxParseARexx rexxtools.library/rxParseARexx
NAME rxParseARexx()
success = rxParseARexx (rexxhd, rmsg, cmdtab, jmptab, userdata,
taglist);
short rxParseARexx (APTR, APTR, APTR, APTR, LONG, struct TagItem *);
D0 -78 A1 A2 A3 A4 D0 A0
DESCRIPTION
This function can be used to parse the message you got from the
rxGetARexxMsg() function, to see if it's one of your own commands. You
have to make some special tables with all your commands and where you
want to go, if it finds one. The commando table has to build like this:
- First a byte indicating the length of your command.
- Then your command in a string (Note that it may not be NULL
terminated).
- At last how many arguments you want for your command (max 8).
- New length to the next command or NULL for end.
You also have to make a jump table. This table is just a couple of
longwords, one for each command. Every longword should be a pointer to
a routine you want to run on the specific command.
When you routine is called, you will in A1 have the userdata and in A6
the rexxtools library base address. In A0 you will get a pointer to the
first argument. Every argument is NULL terminated and will use 256
bytes. That means to get the second argument, you have to add 256 to
the pointer and to get the third argument you have to add 2*256 to the
pointer etc.
You'll have to reply the message in your command routine. This function
will automatic reply the message if some error occurs, like unknown
command.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
rmsg - this is the ARexx message you got from the rxGetARexxMsg()
function.
cmdtab - this is a pointer to a command table.
jmptab - this is a pointer to a jump table.
userdata - this is your own data. It will be in A1 when your command is
called via the jump table.
taglist - a pointer to a array of tags (currently always NULL).
TAGS
No tags defined yet.
RESULT
success - this will be NULL if some error occures.
SEE ALSO
rxGetARexxMsg(), rxReplyARexxMsg(), rxSetARexxLastError()
rexxtools.library/rxReplyARexxMsg rexxtools.library/rxReplyARexxMsg
NAME rxReplyARexxMsg()
rxReplyARexxMsg (rexxhd, rmsg, result, error);
void rxReplyARexxMsg (APTR, APTR, APTR, LONG);
-60 A1 A0 A2 D0
DESCRIPTION
This function replies the ARexx message "rmsg" you have got from the
rxGetARexxMsg() function. The "result" is a pointer to a NULL
terminated result string that will be returned via OPTIONS RESULTS in
the RESULT ARexx variable. If you have no result, set this to NULL. The
"error" is the error severity level. If this is 0, the result string
will be returned, if this is non-zero, the error level will be returned
in RC.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
rmsg - this is the ARexx message you got from the rxGetARexxMsg()
function.
result - this is a pointer to a NULL terminated result string or NULL.
error - this is an error severity level code or NULL for no error.
SEE ALSO
rxGetARexxMsg(), rxSetARexxLastError()
rexxtools.library/rxSendARexxMsg rexxtools.library/rxSendARexxMsg
NAME rxSendARexxMsg()
success = rxSendARexxMsg (rexxhd, command, stringfile);
short rxSendARexxMsg (APTR, APTR, short);
D0 -66 A1 A0 D0
DESCRIPTION
This function will send a string to ARexx. It sets the default host to
your application and sets the RXFB_STRING bit in the message if the
"stringfile" is true. That means, you can set this to true if you want
to send an ARexx command or false if you want to start a macro. This
function will return false if the message was not sent.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
command - this is a pointer to a NULL terminated string with the
command or the name of the macro you want to run.
stringfile - this flag indicates if it's a command or a macro you want
to run.
RESULT
success - this will be NULL if some error occurs.
rexxtools.library/rxSetARexxLastError rexxtools.library/rxSetARexxLastError
NAME rxSetARexxLastError()
success = rxSetARexxLastError (rexxhd, rmsg, errorstring);
short rxSetARexxLastError (APTR, APTR, APTR);
D0 -72 A1 A0 A2
DESCRIPTION
This function uses the RVI (Rexx Variable Interface) to set a variable
named <AppBaseName>.LASTERROR to the "errorstring". This is where the
error message should go if there is an error. This function returns
NULL if this fails for any reason.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
rmsg - this is the ARexx message you got from the
rxGetARexxMsg() function.
errorstring - this is a pointer to a NULL terminated string with the
error message.
RESULT
success - this will be NULL if some error occurs.
rexxtools.library/rxToNumber rexxtools.library/rxToNumber
NAME rxToNumber()
number = rxToNumber (rexxhd, string);
LONG rxToNumber (APTR, APTR);
D0 -84 A1 A0
DESCRIPTION
This function can be used if you want to convert an argument to a
binary number. It will just convert your ASCII string to a signed
number.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
string - this is a pointer to a NULL terminated string with the number
to want to convert.
RESULT
number - this is a 32 bit signed number.
SEE ALSO
rxToString()
rexxtools.library/rxToString rexxtools.library/rxToString
NAME rxToString()
rxToString (rexxhd, number, buffer);
void rxToString (APTR, LONG, APTR);
-90 A1 D0 A0
DESCRIPTION
This function can be used if you want to convert a number to a result
string. It will just convert your signed longword to an NULL terminated
ASCII string.
INPUTS
rexxhd - this is the rexx handler you got from the rxInitARexx()
function.
number - this is your signed longword you want to convert.
buffer - this is a pointer to a buffer where you want to store the
string.
SEE ALSO
rxToNumber()